#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#include <iostream>
using namespace std ;

typedef void (*processTimer) ( int sig ) ;

class Timer
{
private:
	int deltaTime ; //In unit of seconds
	processTimer pTF ;
	
public:
	Timer (int dt, processTimer inPTF) : deltaTime(dt), pTF(inPTF) 
	{
		signal(SIGALRM, pTF) ;
	}
	
	void Start ( ) 
	{
		alarm(deltaTime) ;
	}

} ;

